<style>
    .m-finish {
        position: absolute;
        right: 25upx;
        top: 10upx;
        font-size: 30upx;
        font-weight: bold;
    }

    .g-header {
        height: 42upx;
        width: 694upx;
        margin: 0 auto;
        overflow: hidden;
        line-height: 42upx;
        margin-top: 10upx;
    }

    .g-header .m-icon {
        float: left
    }

    .g-header .m-finish-status {
        text-align: center;
        position: relative;
        left: -10upx;
        font-size: 30upx;
        font-weight: bold;
    }

    .g-pay-status-img {
        text-align: center;
        background: #fff;
        padding-bottom: 20upx;
    }

    .g-pay-status-img image {
        width: 50vw;
    }

    .g-pay-text {
        text-align: center;
        font-size: 30upx;
    }

    .g-product-box {
        width: 100%;
        height: 100%;
        overflow: hidden;

    }

    .m-product-header-title {
        font-size: 40upx;
        color: #fff;
        text-align: center;
        height: 113upx;
        width: 100%;
        display: block;
    }

    .m-product-list {
        width: 100%;
        height: 100%;
        position: relative;
        overflow: hidden;
        background: url('http://ydt2.xunyu999.com/Public/APP/images/pay-product-bg.png') repeat-y;
        background-size: 100%;
    }

    .m-product-list image {
        display: block;
    }

    .m-product-list-box {
        width: 730upx;
        margin: 0 auto;
        height: 100%;
        overflow: hidden;
    }

    .m-product {
        width: 359upx;
        height: 587upx;
        overflow: hidden;
        float: left;
        background: #fff;
        margin-bottom: 12upx;
        position: relative;
    }

    .m-product:nth-child(2n-1) {
        margin-right: 12upx;
    }

    .m-product .product-img {
        width: 359upx;
        height: 359upx;
        overflow: hidden;
    }

    .m-product-info {
        width: 315upx;
        margin: 0 auto;
    }

    .u-product-title {
        width: 100%;
        font-size: 25upx;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        margin-top: 15upx;
    }

    .u-progress {
        width: 260upx;
        height: 25upx;
        background: #fdd0d0;
        border-radius: 25upx;
        margin-top: 26upx;
        position: relative;
    }

    .u-progress-have {
        position: absolute;
        height: 100%;
        background: #d71311;
        border-radius: 25upx;
    }

    .u-progress-siblings {
        font-size: 10upx;
        width: 100%;
        -webkit-text-size-adjust: none;
        -webkit-transform: scale(0.8);
        color: #fff;
        text-align: center;
        position: absolute;
        height: 100%;
        line-height: 25upx;
        z-index: 99;
    }

    .u-product-price-box {
        height: 29upx;
        line-height: 29upx;
        margin-top: 35upx;
        display: flex;
        align-items: flex-end;
    }

    .u-product-price-l {
        display: flex;
        align-items: flex-end;
        color: #d71311;
    }

    .u-product-price-mark {
        font-size: 24upx;
    }

    .u-product-price {
        font-size: 35upx;
        margin-left: 3upx;
        margin-right: 11upx;
    }

    .u-product-price-l text {
        color: #6d6b6b;
        font-size: 24upx;
    }

    .u-product-surplus-people {
        float: left;
        color: #6d6b6b;
        font-size: 24upx;
        margin-right: 20upx;
    }

    .u-product-user-list {
        position: relative;
        float: right;
    }

    .u-product-user-list image {
        height: 46upx;
        width: 48upx;
        float: left;
        position: absolute;
        left: 18upx;
        border-radius: 25upx;
    }

    .u-product-user-list image:nth-child(1) {
        left: 0upx !important;
        z-index: 9;
    }

    /* 拼的头像 */
    .u-user-pic {
        width: 40upx;
        height: 40upx;
        border-radius: 100px;
        position: absolute;
        border: 1px solid #fff;
        bottom: 30upx;
    }

    .u-user-pic0 {
        right: 22upx;
    }

    .u-user-pic1 {
        z-index: 1;
        right: 38upx;
    }

    .g-price {
        font-size: 32upx;
        color: #d71311;
        margin-right: 15upx;
        display: inline-flex;
        width: 60px;
    }

    .g-price text {
        font-size: 24upx;
    }

    .g-remain {
        color: #ccc;
        font-size: 24upx;
    }
</style>
<template>
    <view class='page'>
        <view class="g-pay-status-img">
            <image src="../../static/images/pay-success.jpg" mode="widthFix"></image>
            <view class="g-pay-text">{{successText}}</view>
        </view>

        
        <view class="m-loading" v-if="bIsLoading">
        	<image src="../../static/images/loading.gif" mode="widthFix"></image>
			<text>加载中</text>
        </view>
    </view>
</template>

<script>
	import henglang from '../../common/common.js';
    export default {
        data() {
            return {
                product: [],
                bIsLoading: false,
				goUrl:'',
				successText: ''
            };
        },
		methods:{
			back() {
				uni.navigateTo({
					url:'/pages/user/grouping'
				})
			}
		},
		onLoad({team_id}){
			let that = this;
			henglang.get('order/teamHasLottery',{team_id:team_id},true,function(res){
				if(res.data.data.has_lottery == true){
					that.goUrl = '/pages/user/grouped';
					that.successText = '本期已成功成团！'
				}else{
					that.goUrl = '/pages/user/grouping';
					that.successText = '静待公布，希望你能夺魁！'
				}
			});
		},
        onNavigationBarButtonTap({index}) {
            let that = this;
			if (index == 0 && that.goUrl) {
				uni.redirectTo({
					url: that.goUrl
				})
            }
        },
		
		onBackPress(options) {  
		    if (options.from === 'navigateBack') {  
		        return false;  
		    }  
		    this.back();  
		    return true;  
			
		}
    }
</script>
